<!--界面展示窗口-->
<template>
  <div>
    <braek></braek>
    <!-- 卡片区域 -->
    <el-card>
      <el-table :data="rightsList" style="width: 100%">
        <el-table-column prop="rightFrom.id" label="#" width="180"></el-table-column>
        <el-table-column prop="rightFrom.authName" label="权限说明" width="180"></el-table-column>
        <el-table-column prop="rightFrom.path" label="路径"></el-table-column>
        <el-table-column prop="rightFrom.level" label="权限等级"></el-table-column>
      </el-table>
    </el-card>
  </div>
</template>
<!--业务逻辑-->
<script>
import braek from "../Bread.vue";
export default {
  components: {
    braek
  },
  data() {
    return {
      rightsList: [],
      rightFrom: {
        level: "",
        path: "",
        authName: "",
        id: ""
      }
    };
  },
  //方法
  methods: {
    //获取权限列表
    async getRightlist() {
      const { data: res } = await this.$http.get("rights/list");
      if (res.meta.status !== 200) {
        return this.$messag.error("获取权限列表失败");
      }
      this.rightsList = res.data;
      console.log(this.rightsList);
    }
  },
  //创建
  created() {
    this.getRightlist();
  }
};
</script>



<style lang="scss" scoped>
</style>